#!/bin/zsh

if [[ $LBUFFER == *$'\n'* ]]; then
  builtin zle up-line
else
  builtin zle history-search-backward -w
fi
